/**
 * 
 */
package com.fengniu.ejb.dao.interceptor;

import javax.interceptor.AroundInvoke;
import javax.interceptor.InvocationContext;

import org.apache.log4j.Logger;

/**
 * @author Conan
 *
 */
public class DefaultInterceptor {
	Logger logger = Logger.getLogger(DefaultInterceptor.class.getName());

	@AroundInvoke
	public Object intercept(InvocationContext ctx) throws Exception {
		logger.info("*** DefaultInterceptor intercepting " + ctx.getMethod().getName());
		try {
			return ctx.proceed();
		} finally {
			logger.info("*** DefaultInterceptor exiting");
		}
	}
}